<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmMessageBox.cpp -->
  <meta name="description" content="自定义外观的消息框，用法参考 QMessageBox.">
  <title>QCtmMessageBox Class | QCustomUi 1.19.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.19.0</a></li>
<li><a href="qcustomui-module.html" translate="no">QCustomUi</a></li>
<li>QCtmMessageBox</li>
<li id="buildversion">QCustomUi 1.19.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title" translate="no">QCtmMessageBox Class</h1>
<!-- $$$QCtmMessageBox-brief -->
<p>自定义外观的消息框，用法参考 <a href="https://doc.qt.io/qt/qmessagebox.html" translate="no">QMessageBox</a>. <a href="#details">More...</a></p>
<!-- @@@QCtmMessageBox -->
<div class="table"><table class="alignedsummary requisites" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <code translate="no">#include &lt;QCtmMessageBox.h&gt;</code></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qctmdialog.html" translate="no">QCtmDialog</a></td></tr>
</table></div>
<ul>
<li><a href="qctmmessagebox-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#ButtonRole-enum" translate="no">ButtonRole</a></b> { InvalidRole, AcceptRole, RejectRole, DestructiveRole, ActionRole, &hellip;, ResetRole }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#Icon-enum" translate="no">Icon</a></b> { NoIcon, Question, Information, Warning, Critical }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#StandardButton-enum" translate="no">StandardButton</a></b> { Ok, Open, Save, Cancel, Close, &hellip;, NoButton }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#StandardButton-enum" translate="no">StandardButtons</a></b></td></tr>
</table></div>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary" translate="no">
<tr><td class="topAlign"><ul>
<li class="fn" translate="no"><b><a href="qctmmessagebox.html#icon-prop" translate="no">icon</a></b> : Icon</li>
<li class="fn" translate="no"><b><a href="qctmmessagebox.html#iconPixmap-prop" translate="no">iconPixmap</a></b> : QPixmap</li>
<li class="fn" translate="no"><b><a href="qctmmessagebox.html#standardButtons-prop" translate="no">standardButtons</a></b> : StandardButtons</li>
</ul></td><td class="topAlign"><ul>
<li class="fn" translate="no"><b><a href="qctmmessagebox.html#text-prop" translate="no">text</a></b> : QString</li>
<li class="fn" translate="no"><b><a href="qctmmessagebox.html#textFormat-prop" translate="no">textFormat</a></b> : Qt::TextFormat</li>
<li class="fn" translate="no"><b><a href="qctmmessagebox.html#textInteractionFlags-prop" translate="no">textInteractionFlags</a></b> : Qt::TextInteractionFlags</li>
</ul>
</td></tr>
</table></div>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#QCtmMessageBox" translate="no">QCtmMessageBox</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#QCtmMessageBox-1" translate="no">QCtmMessageBox</a></b>(QCtmMessageBox::Icon <i>icon</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = NoButton, QWidget *<i>parent</i> = nullptr, Qt::WindowFlags <i>f</i> = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#dtor.QCtmMessageBox" translate="no">~QCtmMessageBox</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#addButton" translate="no">addButton</a></b>(QAbstractButton *<i>button</i>, QCtmMessageBox::ButtonRole <i>role</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPushButton *</td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#addButton-1" translate="no">addButton</a></b>(QCtmMessageBox::StandardButton <i>button</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPushButton *</td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#addButton-2" translate="no">addButton</a></b>(const QString &amp;<i>text</i>, QCtmMessageBox::ButtonRole <i>role</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractButton *</td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#clickedButton" translate="no">clickedButton</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#defaultButton" translate="no">defaultButton</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::Icon </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#icon" translate="no">icon</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#iconPixmap" translate="no">iconPixmap</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#removeButton" translate="no">removeButton</a></b>(QAbstractButton *<i>button</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setDefaultButton" translate="no">setDefaultButton</a></b>(QCtmMessageBox::StandardButton <i>button</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setIcon" translate="no">setIcon</a></b>(QCtmMessageBox::Icon <i>icon</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setIconPixmap" translate="no">setIconPixmap</a></b>(const QPixmap &amp;<i>pixmap</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setStandardButtons" translate="no">setStandardButtons</a></b>(QCtmMessageBox::StandardButtons <i>buttons</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setText" translate="no">setText</a></b>(const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setTextFormat" translate="no">setTextFormat</a></b>(Qt::TextFormat <i>format</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setTextInteractionFlags" translate="no">setTextInteractionFlags</a></b>(Qt::TextInteractionFlags <i>flags</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setTimeout" translate="no">setTimeout</a></b>(const std::chrono::seconds &amp;<i>timeout</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#setTimeoutVisible" translate="no">setTimeoutVisible</a></b>(bool <i>visible</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#standardButton" translate="no">standardButton</a></b>(QAbstractButton *<i>button</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButtons </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#standardButtons" translate="no">standardButtons</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#text" translate="no">text</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#textFormat" translate="no">textFormat</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextInteractionFlags </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#textInteractionFlags" translate="no">textInteractionFlags</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const std::chrono::seconds &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#timeout" translate="no">timeout</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#timeoutVisible" translate="no">timeoutVisible</a></b>() const</td></tr>
</table></div>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#critical" translate="no">critical</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = Ok, QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#critical-1" translate="no">critical</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, const std::chrono::seconds &amp;<i>timeout</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = Ok, QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#information" translate="no">information</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = Ok, QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#information-1" translate="no">information</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, const std::chrono::seconds &amp;<i>timeout</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = Ok, QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#question" translate="no">question</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = StandardButtons(Yes | No), QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#question-1" translate="no">question</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, const std::chrono::seconds &amp;<i>timeout</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = StandardButtons(Yes | No), QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#warning" translate="no">warning</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = Ok, QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmMessageBox::StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#warning-1" translate="no">warning</a></b>(QWidget *<i>parent</i>, const QString &amp;<i>title</i>, const QString &amp;<i>text</i>, const std::chrono::seconds &amp;<i>timeout</i>, QCtmMessageBox::StandardButtons <i>buttons</i> = Ok, QCtmMessageBox::StandardButton <i>defaultButton</i> = NoButton)</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#done" translate="no">done</a></b>(int <i>r</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmmessagebox.html#showEvent" translate="no">showEvent</a></b>(QShowEvent *<i>event</i>) override</td></tr>
</table></div>
<!-- $$$QCtmMessageBox-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p><b>截图:</b></p>
<p class="centerAlign"><img src="images/QCtmMessageBoxDetail.png" alt="" /></p></div>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html" translate="no">QMessageBox</a>.</p>
<!-- @@@QCtmMessageBox -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ButtonRole$$$InvalidRole$$$AcceptRole$$$RejectRole$$$DestructiveRole$$$ActionRole$$$HelpRole$$$YesRole$$$NoRole$$$ResetRole$$$ApplyRole$$$NRoles -->
<h3 class="fn" translate="no" id="ButtonRole-enum">enum QCtmMessageBox::<span class="name">ButtonRole</span></h3>
<p>按钮角色.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::InvalidRole</code></td><td class="topAlign tblval"><code translate="no">-1</code></td><td class="topAlign">无效按钮.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::AcceptRole</code></td><td class="topAlign tblval"><code translate="no">0</code></td><td class="topAlign">点击按钮将使窗口以 Accepted 关闭，例如：“确定” 按钮.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::RejectRole</code></td><td class="topAlign tblval"><code translate="no">1</code></td><td class="topAlign">点击按钮将使窗口以 Rejected 关闭，例如：“取消” 按钮.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::DestructiveRole</code></td><td class="topAlign tblval"><code translate="no">2</code></td><td class="topAlign">点击按钮将取消更改并关闭弹窗，例如：“放弃更改” 按钮.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::ActionRole</code></td><td class="topAlign tblval"><code translate="no">3</code></td><td class="topAlign">点击该按钮将导致对话框中的元素发生更改.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::HelpRole</code></td><td class="topAlign tblval"><code translate="no">4</code></td><td class="topAlign">点击按钮请求帮助.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::YesRole</code></td><td class="topAlign tblval"><code translate="no">5</code></td><td class="topAlign">类似于 “是” 按钮.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::NoRole</code></td><td class="topAlign tblval"><code translate="no">6</code></td><td class="topAlign">类似于 “否” 按钮.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::ApplyRole</code></td><td class="topAlign tblval"><code translate="no">8</code></td><td class="topAlign">类似于 “应用” 按钮.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::ResetRole</code></td><td class="topAlign tblval"><code translate="no">7</code></td><td class="topAlign">类似于 “恢复默认” 按钮.</td></tr>
</table></div>
<p><b>See also </b><a href="qctmmessagebox.html#StandardButton-enum" translate="no">StandardButton</a>.</p>
<!-- @@@ButtonRole -->
<!-- $$$Icon$$$NoIcon$$$Information$$$Warning$$$Critical$$$Question -->
<h3 class="fn" translate="no" id="Icon-enum">enum QCtmMessageBox::<span class="name">Icon</span></h3>
<p>显示图标.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::NoIcon</code></td><td class="topAlign tblval"><code translate="no">0</code></td><td class="topAlign">无图标.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Question</code></td><td class="topAlign tblval"><code translate="no">4</code></td><td class="topAlign">询问图标.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Information</code></td><td class="topAlign tblval"><code translate="no">1</code></td><td class="topAlign">信息图标.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Warning</code></td><td class="topAlign tblval"><code translate="no">2</code></td><td class="topAlign">警告图标.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Critical</code></td><td class="topAlign tblval"><code translate="no">3</code></td><td class="topAlign">错误图标.</td></tr>
</table></div>
<!-- @@@Icon -->
<!-- $$$StandardButton$$$NoButton$$$Ok$$$Save$$$SaveAll$$$Open$$$Yes$$$YesToAll$$$No$$$NoToAll$$$Abort$$$Retry$$$Ignore$$$Close$$$Cancel$$$Discard$$$Help$$$Apply$$$Reset$$$RestoreDefaults$$$FirstButton$$$LastButton -->
<h3 class="flags" id="StandardButton-enum">enum QCtmMessageBox::<span class="name">StandardButton</span><br/>flags QCtmMessageBox::<span class="name">StandardButtons</span></h3>
<p>这些枚举描述了标准按钮的标志。每个按钮有一个对应的 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">ButtonRole</a>.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Ok</code></td><td class="topAlign tblval"><code translate="no">0x00000400</code></td><td class="topAlign">“确定” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Open</code></td><td class="topAlign tblval"><code translate="no">0x00002000</code></td><td class="topAlign">“打开” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Save</code></td><td class="topAlign tblval"><code translate="no">0x00000800</code></td><td class="topAlign">“保存” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Cancel</code></td><td class="topAlign tblval"><code translate="no">0x00400000</code></td><td class="topAlign">“取消” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">RejectRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Close</code></td><td class="topAlign tblval"><code translate="no">0x00200000</code></td><td class="topAlign">“关闭” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">RejectRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Discard</code></td><td class="topAlign tblval"><code translate="no">0x00800000</code></td><td class="topAlign">“放弃更改” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">DestructiveRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Apply</code></td><td class="topAlign tblval"><code translate="no">0x02000000</code></td><td class="topAlign">“应用” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">ApplyRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Reset</code></td><td class="topAlign tblval"><code translate="no">0x04000000</code></td><td class="topAlign">“重置” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">ResetRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::RestoreDefaults</code></td><td class="topAlign tblval"><code translate="no">0x08000000</code></td><td class="topAlign">“恢复默认” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">ResetRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Help</code></td><td class="topAlign tblval"><code translate="no">0x01000000</code></td><td class="topAlign">“帮助” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">HelpRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::SaveAll</code></td><td class="topAlign tblval"><code translate="no">0x00001000</code></td><td class="topAlign">“全部保存” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Yes</code></td><td class="topAlign tblval"><code translate="no">0x00004000</code></td><td class="topAlign">“是” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">YesRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::YesToAll</code></td><td class="topAlign tblval"><code translate="no">0x00008000</code></td><td class="topAlign">“全部是” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">YesRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::No</code></td><td class="topAlign tblval"><code translate="no">0x00010000</code></td><td class="topAlign">“否” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">NoRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::NoToAll</code></td><td class="topAlign tblval"><code translate="no">0x00020000</code></td><td class="topAlign">“全部否” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">NoRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Abort</code></td><td class="topAlign tblval"><code translate="no">0x00040000</code></td><td class="topAlign">“中止” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">RejectRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Retry</code></td><td class="topAlign tblval"><code translate="no">0x00080000</code></td><td class="topAlign">“重试” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::Ignore</code></td><td class="topAlign tblval"><code translate="no">0x00100000</code></td><td class="topAlign">“忽略” 按钮，对应 <a href="qctmmessagebox.html#ButtonRole-enum" translate="no">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmMessageBox::NoButton</code></td><td class="topAlign tblval"><code translate="no">0x00000000</code></td><td class="topAlign">无效按钮.</td></tr>
</table></div>
<p>The StandardButtons type is a typedef for <a href="https://doc.qt.io/qt/qflags.html">QFlags</a>&lt;StandardButton&gt;. It stores an OR combination of StandardButton values.</p>
<p><b>See also </b><a href="qctmmessagebox.html#ButtonRole-enum" translate="no">ButtonRole</a> and <a href="qctmmessagebox.html#standardButtons" translate="no">standardButtons</a>.</p>
<!-- @@@StandardButton -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$icon-prop$$$icon$$$setIconQCtmMessageBox::Icon -->
<h3 class="fn" translate="no" id="icon-prop"><span class="name">icon</span> : <span class="type"><a href="qctmmessagebox.html#Icon-enum" translate="no">Icon</a></span></h3>
<p>消息弹窗的图标.</p>
<p>这些图标可以是下面的任意一个:</p>
<ul>
<li><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::NoIcon</a></li>
<li><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::Question</a></li>
<li><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::Information</a></li>
<li><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::Warning</a></li>
<li><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::Critical</a></li>
</ul>
<p>默认为 <a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::NoIcon</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> QCtmMessageBox::Icon </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#icon" translate="no">icon</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#setIcon" translate="no">setIcon</a></b></span>(QCtmMessageBox::Icon <i>icon</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qctmmessagebox.html#iconPixmap" translate="no">iconPixmap</a>.</p>
<!-- @@@icon -->
<!-- $$$iconPixmap-prop$$$iconPixmap$$$setIconPixmapconstQPixmap& -->
<h3 class="fn" translate="no" id="iconPixmap-prop"><span class="name">iconPixmap</span> : <span class="type"><a href="https://doc.qt.io/qt/qpixmap.html" translate="no">QPixmap</a></span></h3>
<p>当前显示图标.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> QPixmap </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#iconPixmap" translate="no">iconPixmap</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#setIconPixmap" translate="no">setIconPixmap</a></b></span>(const QPixmap &amp;<i>pixmap</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qctmmessagebox.html#icon" translate="no">icon</a>.</p>
<!-- @@@iconPixmap -->
<!-- $$$standardButtons-prop$$$standardButtons$$$setStandardButtonsQCtmMessageBox::StandardButtons -->
<h3 class="fn" translate="no" id="standardButtons-prop"><span class="name">standardButtons</span> : <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">StandardButtons</a></span></h3>
<p>消息弹窗的按钮集合.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> QCtmMessageBox::StandardButtons </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#standardButtons" translate="no">standardButtons</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#setStandardButtons" translate="no">setStandardButtons</a></b></span>(QCtmMessageBox::StandardButtons <i>buttons</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qctmmessagebox.html#addButton" translate="no">addButton</a>.</p>
<!-- @@@standardButtons -->
<!-- $$$text-prop$$$text$$$setTextconstQString& -->
<h3 class="fn" translate="no" id="text-prop"><span class="name">text</span> : <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span></h3>
<p>消息弹窗的显示文本.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#text" translate="no">text</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#setText" translate="no">setText</a></b></span>(const QString &amp;<i>text</i>)</td></tr>
</table></div>
<!-- @@@text -->
<!-- $$$textFormat-prop$$$textFormat$$$setTextFormatQt::TextFormat -->
<h3 class="fn" translate="no" id="textFormat-prop"><span class="name">textFormat</span> : <span class="type"><a href="https://doc.qt.io/qt/qt.html#TextFormat-enum" translate="no">Qt::TextFormat</a></span></h3>
<p>消息框显示的文本格式.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#textFormat" translate="no">textFormat</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#setTextFormat" translate="no">setTextFormat</a></b></span>(Qt::TextFormat <i>format</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qctmmessagebox.html#setText" translate="no">setText</a>().</p>
<!-- @@@textFormat -->
<!-- $$$textInteractionFlags-prop$$$textInteractionFlags$$$setTextInteractionFlagsQt::TextInteractionFlags -->
<h3 class="fn" translate="no" id="textInteractionFlags-prop"><span class="name">textInteractionFlags</span> : <span class="type"><a href="https://doc.qt.io/qt/qt.html#TextInteractionFlag-enum" translate="no">Qt::TextInteractionFlags</a></span></h3>
<p>指定消息框的标签应如何与用户交互输入。</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextInteractionFlags </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#textInteractionFlags" translate="no">textInteractionFlags</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmmessagebox.html#setTextInteractionFlags" translate="no">setTextInteractionFlags</a></b></span>(Qt::TextInteractionFlags <i>flags</i>)</td></tr>
</table></div>
<!-- @@@textInteractionFlags -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmMessageBox[overload1]$$$QCtmMessageBoxQWidget* -->
<h3 class="fn" translate="no" id="QCtmMessageBox"><code class="details extra" translate="no">[explicit]</code> QCtmMessageBox::<span class="name">QCtmMessageBox</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>构造函数 <i translate="no">parent</i>.</p>
<!-- @@@QCtmMessageBox -->
<!-- $$$QCtmMessageBox$$$QCtmMessageBoxQCtmMessageBox::IconconstQString&constQString&QCtmMessageBox::StandardButtonsQWidget*Qt::WindowFlags -->
<h3 class="fn" translate="no" id="QCtmMessageBox-1">QCtmMessageBox::<span class="name">QCtmMessageBox</span>(<span class="type"><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::Icon</a></span> <i>icon</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = NoButton, <span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i> = nullptr, <span class="type"><a href="https://doc.qt.io/qt/qt.html#WindowType-enum" translate="no">Qt::WindowFlags</a></span> <i>f</i> = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint)</h3>
<p>构造函数，并指定显示图标 <i translate="no">icon</i>, 标题文本 <i translate="no">title</i>, 显示文本 <i translate="no">text</i>, 按钮集合 <i translate="no">buttons</i>, 父窗口 <i translate="no">parent</i>, 窗口风格 <i translate="no">f</i>.</p>
<!-- @@@QCtmMessageBox -->
<!-- $$$~QCtmMessageBox[overload1]$$$~QCtmMessageBox -->
<h3 class="fn" translate="no" id="dtor.QCtmMessageBox"><code class="details extra" translate="no">[virtual noexcept]</code> QCtmMessageBox::<span class="name">~QCtmMessageBox</span>()</h3>
<p>析构函数.</p>
<!-- @@@~QCtmMessageBox -->
<!-- $$$addButton[overload1]$$$addButtonQAbstractButton*QCtmMessageBox::ButtonRole -->
<h3 class="fn" translate="no" id="addButton"><span class="type">void</span> QCtmMessageBox::<span class="name">addButton</span>(<span class="type">QAbstractButton</span> *<i>button</i>, <span class="type"><a href="qctmmessagebox.html#ButtonRole-enum" translate="no">QCtmMessageBox::ButtonRole</a></span> <i>role</i>)</h3>
<p>添加按钮 <i translate="no">button</i> 并指定其角色 <i translate="no">role</i>.</p>
<p><b>See also </b><a href="qctmmessagebox.html#removeButton" translate="no">removeButton</a>.</p>
<!-- @@@addButton -->
<!-- $$$addButton$$$addButtonQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="addButton-1"><span class="type"><a href="https://doc.qt.io/qt/qpushbutton.html" translate="no">QPushButton</a></span> *QCtmMessageBox::<span class="name">addButton</span>(<span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>button</i>)</h3>
<p>添加标准按钮 <i translate="no">button</i>.</p>
<p>This function overloads addButton.</p>
<p><b>See also </b><a href="qctmmessagebox.html#removeButton" translate="no">removeButton</a>.</p>
<!-- @@@addButton -->
<!-- $$$addButton$$$addButtonconstQString&QCtmMessageBox::ButtonRole -->
<h3 class="fn" translate="no" id="addButton-2"><span class="type"><a href="https://doc.qt.io/qt/qpushbutton.html" translate="no">QPushButton</a></span> *QCtmMessageBox::<span class="name">addButton</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmmessagebox.html#ButtonRole-enum" translate="no">QCtmMessageBox::ButtonRole</a></span> <i>role</i>)</h3>
<p>创建文本为 <i translate="no">text</i> 的按钮并指定其角色 <i translate="no">role</i>.</p>
<p>This function overloads addButton.</p>
<p><b>See also </b><a href="qctmmessagebox.html#removeButton" translate="no">removeButton</a>.</p>
<!-- @@@addButton -->
<!-- $$$clickedButton[overload1]$$$clickedButton -->
<h3 class="fn" translate="no" id="clickedButton"><span class="type">QAbstractButton</span> *QCtmMessageBox::<span class="name">clickedButton</span>() const</h3>
<p>返回点击的按钮.</p>
<!-- @@@clickedButton -->
<!-- $$$critical[overload1]$$$criticalQWidget*constQString&constQString&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="critical"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">critical</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = Ok, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>构造一个错误消息弹窗，并指定标题文本 <i translate="no">title</i>, 显示文本 <i translate="no">text</i>, 按钮集合 <i translate="no">buttons</i>, 默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html#critical" translate="no">QMessageBox::critical</a>.</p>
<!-- @@@critical -->
<!-- $$$critical$$$criticalQWidget*constQString&constQString&conststd::chrono::seconds&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="critical-1"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">critical</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, const <span class="type">std::chrono::seconds</span> &amp;<i>timeout</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = Ok, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>This function overloads 构造一个错误消息弹窗，并指定标题文本 \a title, 显示文本 \a text, \a 超时自动关闭时间 \a timeout, 按钮集合 \a buttons,.</p>
<p>默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="qctmmessagebox.html#critical" translate="no">critical</a>.</p>
<!-- @@@critical -->
<!-- $$$defaultButton[overload1]$$$defaultButton -->
<h3 class="fn" translate="no" id="defaultButton"><span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">defaultButton</span>()</h3>
<p>返回默认按钮.</p>
<p><b>See also </b><a href="qctmmessagebox.html#setDefaultButton" translate="no">setDefaultButton</a>.</p>
<!-- @@@defaultButton -->
<!-- $$$done[overload1]$$$doneint -->
<h3 class="fn" translate="no" id="done"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmMessageBox::<span class="name">done</span>(<span class="type">int</span> <i>r</i>)</h3>
<!-- @@@done -->
<!-- $$$icon -->
<h3 class="fn" translate="no" id="icon"><span class="type"><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::Icon</a></span> QCtmMessageBox::<span class="name">icon</span>() const</h3>
<p>返回显示图标.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property icon. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#setIcon" translate="no">setIcon</a>.</p>
<!-- @@@icon -->
<!-- $$$iconPixmap -->
<h3 class="fn" translate="no" id="iconPixmap"><span class="type"><a href="https://doc.qt.io/qt/qpixmap.html" translate="no">QPixmap</a></span> QCtmMessageBox::<span class="name">iconPixmap</span>() const</h3>
<p>返回图标.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property iconPixmap. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#setIconPixmap" translate="no">setIconPixmap</a>.</p>
<!-- @@@iconPixmap -->
<!-- $$$information[overload1]$$$informationQWidget*constQString&constQString&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="information"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">information</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = Ok, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>构造一个信息消息弹窗，并指定标题文本 <i translate="no">title</i>, 显示文本 <i translate="no">text</i>, 按钮集合 <i translate="no">buttons</i>, 默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html#information" translate="no">QMessageBox::information</a>.</p>
<!-- @@@information -->
<!-- $$$information$$$informationQWidget*constQString&constQString&conststd::chrono::seconds&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="information-1"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">information</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, const <span class="type">std::chrono::seconds</span> &amp;<i>timeout</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = Ok, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>This function overloads 构造一个信息消息弹窗，并指定标题文本 \a title, 显示文本 \a text, \a 超时自动关闭时间 \a timeout, 按钮集合 \a buttons,.</p>
<p>默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html#information" translate="no">QMessageBox::information</a>.</p>
<!-- @@@information -->
<!-- $$$question[overload1]$$$questionQWidget*constQString&constQString&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="question"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">question</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = StandardButtons(Yes | No), <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>构造一个询问消息弹窗，并指定标题文本 <i translate="no">title</i>, 显示文本 <i translate="no">text</i>, 按钮集合 <i translate="no">buttons</i>, 默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html#question" translate="no">QMessageBox::question</a>.</p>
<!-- @@@question -->
<!-- $$$question$$$questionQWidget*constQString&constQString&conststd::chrono::seconds&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="question-1"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">question</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, const <span class="type">std::chrono::seconds</span> &amp;<i>timeout</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = StandardButtons(Yes | No), <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>This function overloads 构造一个询问消息弹窗，并指定标题文本 \a title, 显示文本 \a text, \a 超时自动关闭时间 \a timeout, 按钮集合 \a buttons,.</p>
<p>默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html#question" translate="no">QMessageBox::question</a>.</p>
<!-- @@@question -->
<!-- $$$removeButton[overload1]$$$removeButtonQAbstractButton* -->
<h3 class="fn" translate="no" id="removeButton"><span class="type">void</span> QCtmMessageBox::<span class="name">removeButton</span>(<span class="type">QAbstractButton</span> *<i>button</i>)</h3>
<p>移除按钮 <i translate="no">button</i>.</p>
<p><b>See also </b><a href="qctmmessagebox.html#addButton" translate="no">addButton</a>.</p>
<!-- @@@removeButton -->
<!-- $$$setDefaultButton[overload1]$$$setDefaultButtonQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="setDefaultButton"><span class="type">void</span> QCtmMessageBox::<span class="name">setDefaultButton</span>(<span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>button</i>)</h3>
<p>设置默认按钮 <i translate="no">button</i>.</p>
<p><b>See also </b><a href="qctmmessagebox.html#defaultButton" translate="no">defaultButton</a>.</p>
<!-- @@@setDefaultButton -->
<!-- $$$setIcon -->
<h3 class="fn" translate="no" id="setIcon"><span class="type">void</span> QCtmMessageBox::<span class="name">setIcon</span>(<span class="type"><a href="qctmmessagebox.html#Icon-enum" translate="no">QCtmMessageBox::Icon</a></span> <i>icon</i>)</h3>
<p>设置显示图标 <i translate="no">icon</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmmessagebox.html#icon" translate="no">icon</a>. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#icon" translate="no">icon</a>().</p>
<!-- @@@setIcon -->
<!-- $$$setIconPixmap -->
<h3 class="fn" translate="no" id="setIconPixmap"><span class="type">void</span> QCtmMessageBox::<span class="name">setIconPixmap</span>(const <span class="type"><a href="https://doc.qt.io/qt/qpixmap.html" translate="no">QPixmap</a></span> &amp;<i>pixmap</i>)</h3>
<p>设置自定义的图标 <i translate="no">pixmap</i>, 并且 <a href="qctmmessagebox.html#icon" translate="no">icon</a> 将被设置为 Icon::NoIcon.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmmessagebox.html#iconPixmap" translate="no">iconPixmap</a>. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#iconPixmap" translate="no">iconPixmap</a>.</p>
<!-- @@@setIconPixmap -->
<!-- $$$setStandardButtons -->
<h3 class="fn" translate="no" id="setStandardButtons"><span class="type">void</span> QCtmMessageBox::<span class="name">setStandardButtons</span>(<span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i>)</h3>
<p>设置按钮集合 <i translate="no">buttons</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmmessagebox.html#standardButtons" translate="no">standardButtons</a>. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#standardButtons" translate="no">standardButtons</a>().</p>
<!-- @@@setStandardButtons -->
<!-- $$$setText -->
<h3 class="fn" translate="no" id="setText"><span class="type">void</span> QCtmMessageBox::<span class="name">setText</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>)</h3>
<p>设置显示文本 <i translate="no">text</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmmessagebox.html#text" translate="no">text</a>. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#text" translate="no">text</a>().</p>
<!-- @@@setText -->
<!-- $$$setTextFormat -->
<h3 class="fn" translate="no" id="setTextFormat"><span class="type">void</span> QCtmMessageBox::<span class="name">setTextFormat</span>(<span class="type"><a href="https://doc.qt.io/qt/qt.html#TextFormat-enum" translate="no">Qt::TextFormat</a></span> <i>format</i>)</h3>
<p>设置文本格式 <i translate="no">format</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmmessagebox.html#textFormat" translate="no">textFormat</a>. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#textFormat" translate="no">textFormat</a>().</p>
<!-- @@@setTextFormat -->
<!-- $$$setTextInteractionFlags -->
<h3 class="fn" translate="no" id="setTextInteractionFlags"><span class="type">void</span> QCtmMessageBox::<span class="name">setTextInteractionFlags</span>(<span class="type"><a href="https://doc.qt.io/qt/qt.html#TextInteractionFlag-enum" translate="no">Qt::TextInteractionFlags</a></span> <i>flags</i>)</h3>
<p>设置文本交互方式 <i translate="no">flags</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmmessagebox.html#textInteractionFlags" translate="no">textInteractionFlags</a>. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#textInteractionFlags" translate="no">textInteractionFlags</a>().</p>
<!-- @@@setTextInteractionFlags -->
<!-- $$$setTimeout[overload1]$$$setTimeoutconststd::chrono::seconds& -->
<h3 class="fn" translate="no" id="setTimeout"><span class="type">void</span> QCtmMessageBox::<span class="name">setTimeout</span>(const <span class="type">std::chrono::seconds</span> &amp;<i>timeout</i>)</h3>
<p>设置显示超时时间 <i translate="no">timeout</i>.</p>
<p><b>See also </b><a href="qctmmessagebox.html#timeout" translate="no">timeout</a>.</p>
<!-- @@@setTimeout -->
<!-- $$$setTimeoutVisible -->
<h3 class="fn" translate="no" id="setTimeoutVisible"><span class="type">void</span> QCtmMessageBox::<span class="name">setTimeoutVisible</span>(<span class="type">bool</span> <i>visible</i>)</h3>
<p>设置倒计时文本是否可见 <i translate="no">visible</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmmessagebox.html#timeoutVisible" translate="no">timeoutVisible</a>. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#timeoutVisible" translate="no">timeoutVisible</a>.</p>
<!-- @@@setTimeoutVisible -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" translate="no" id="showEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmMessageBox::<span class="name">showEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qshowevent.html" translate="no">QShowEvent</a></span> *<i>event</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qwidget.html#showEvent" translate="no">QWidget::showEvent</a>(QShowEvent *event).</p>
<!-- @@@showEvent -->
<!-- $$$standardButton[overload1]$$$standardButtonQAbstractButton* -->
<h3 class="fn" translate="no" id="standardButton"><span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">standardButton</span>(<span class="type">QAbstractButton</span> *<i>button</i>) const</h3>
<p>返回按钮对应的标准按钮 <i translate="no">button</i>.</p>
<!-- @@@standardButton -->
<!-- $$$standardButtons -->
<h3 class="fn" translate="no" id="standardButtons"><span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> QCtmMessageBox::<span class="name">standardButtons</span>() const</h3>
<p>返回按钮集合.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property standardButtons. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#setStandardButtons" translate="no">setStandardButtons</a>.</p>
<!-- @@@standardButtons -->
<!-- $$$text -->
<h3 class="fn" translate="no" id="text"><span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> QCtmMessageBox::<span class="name">text</span>() const</h3>
<p>返回显示文本.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property text. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#setText" translate="no">setText</a>.</p>
<!-- @@@text -->
<!-- $$$textFormat -->
<h3 class="fn" translate="no" id="textFormat"><span class="type"><a href="https://doc.qt.io/qt/qt.html#TextFormat-enum" translate="no">Qt::TextFormat</a></span> QCtmMessageBox::<span class="name">textFormat</span>() const</h3>
<p>返回文本格式.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property textFormat. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#setTextFormat" translate="no">setTextFormat</a>.</p>
<!-- @@@textFormat -->
<!-- $$$textInteractionFlags -->
<h3 class="fn" translate="no" id="textInteractionFlags"><span class="type"><a href="https://doc.qt.io/qt/qt.html#TextInteractionFlag-enum" translate="no">Qt::TextInteractionFlags</a></span> QCtmMessageBox::<span class="name">textInteractionFlags</span>() const</h3>
<p>返回文本交互方式.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property textInteractionFlags. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#setTextInteractionFlags" translate="no">setTextInteractionFlags</a>.</p>
<!-- @@@textInteractionFlags -->
<!-- $$$timeout[overload1]$$$timeout -->
<h3 class="fn" translate="no" id="timeout">const <span class="type">std::chrono::seconds</span> &amp;QCtmMessageBox::<span class="name">timeout</span>() const</h3>
<p>返回显示超时时间.</p>
<p><b>See also </b><a href="qctmmessagebox.html#setTimeout" translate="no">setTimeout</a>.</p>
<!-- @@@timeout -->
<!-- $$$timeoutVisible -->
<h3 class="fn" translate="no" id="timeoutVisible"><span class="type">bool</span> QCtmMessageBox::<span class="name">timeoutVisible</span>() const</h3>
<p>返回倒计时文本是否可见.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property timeoutVisible. </p>
</div><p><b>See also </b><a href="qctmmessagebox.html#setTimeoutVisible" translate="no">setTimeoutVisible</a>.</p>
<!-- @@@timeoutVisible -->
<!-- $$$warning[overload1]$$$warningQWidget*constQString&constQString&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="warning"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">warning</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = Ok, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>构造一个警告消息弹窗，并指定标题文本 <i translate="no">title</i>, 显示文本 <i translate="no">text</i>, 按钮集合 <i translate="no">buttons</i>, 默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html#warning" translate="no">QMessageBox::warning</a>.</p>
<!-- @@@warning -->
<!-- $$$warning$$$warningQWidget*constQString&constQString&conststd::chrono::seconds&QCtmMessageBox::StandardButtonsQCtmMessageBox::StandardButton -->
<h3 class="fn" translate="no" id="warning-1"><code class="details extra" translate="no">[static]</code> <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> QCtmMessageBox::<span class="name">warning</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, const <span class="type">std::chrono::seconds</span> &amp;<i>timeout</i>, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButtons</a></span> <i>buttons</i> = Ok, <span class="type"><a href="qctmmessagebox.html#StandardButton-enum" translate="no">QCtmMessageBox::StandardButton</a></span> <i>defaultButton</i> = NoButton)</h3>
<p>This function overloads 构造一个警告消息弹窗，并指定标题文本 \a title, 显示文本 \a text, \a 超时自动关闭时间 \a timeout, 按钮集合 \a buttons,.</p>
<p>默认按钮 <i translate="no">defaultButton</i>, 父窗口 <i translate="no">parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qmessagebox.html#warning" translate="no">QMessageBox::warning</a>.</p>
<!-- @@@warning -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
